package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ActivitiLeaveMapper;
import com.ruoyi.system.domain.ActivitiLeave;
import com.ruoyi.system.service.IActivitiLeaveService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工作流demo：请假申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-04
 */
@Service
public class ActivitiLeaveServiceImpl implements IActivitiLeaveService 
{
    @Autowired
    private ActivitiLeaveMapper activitiLeaveMapper;

    /**
     * 查询工作流demo：请假申请
     * 
     * @param id 工作流demo：请假申请主键
     * @return 工作流demo：请假申请
     */
    @Override
    public ActivitiLeave selectActivitiLeaveById(Long id)
    {
        return activitiLeaveMapper.selectActivitiLeaveById(id);
    }

    /**
     * 查询工作流demo：请假申请列表
     * 
     * @param activitiLeave 工作流demo：请假申请
     * @return 工作流demo：请假申请
     */
    @Override
    public List<ActivitiLeave> selectActivitiLeaveList(ActivitiLeave activitiLeave)
    {
        return activitiLeaveMapper.selectActivitiLeaveList(activitiLeave);
    }

    /**
     * 新增工作流demo：请假申请
     * 
     * @param activitiLeave 工作流demo：请假申请
     * @return 结果
     */
    @Override
    public int insertActivitiLeave(ActivitiLeave activitiLeave)
    {
        return activitiLeaveMapper.insertActivitiLeave(activitiLeave);
    }

    /**
     * 修改工作流demo：请假申请
     * 
     * @param activitiLeave 工作流demo：请假申请
     * @return 结果
     */
    @Override
    public int updateActivitiLeave(ActivitiLeave activitiLeave)
    {
        return activitiLeaveMapper.updateActivitiLeave(activitiLeave);
    }

    /**
     * 批量删除工作流demo：请假申请
     * 
     * @param ids 需要删除的工作流demo：请假申请主键
     * @return 结果
     */
    @Override
    public int deleteActivitiLeaveByIds(String ids)
    {
        return activitiLeaveMapper.deleteActivitiLeaveByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工作流demo：请假申请信息
     * 
     * @param id 工作流demo：请假申请主键
     * @return 结果
     */
    @Override
    public int deleteActivitiLeaveById(Long id)
    {
        return activitiLeaveMapper.deleteActivitiLeaveById(id);
    }
}
